Skip to content

Add FAIL_ON_UNCOVERED_LINES input to fail on coverage gaps - #44

Merged
ggilder merged 3 commits into
ggilder:mainfrom
martin4861:fail-on-uncovered-lines
Aug 1, 2026
Merged

Add FAIL_ON_UNCOVERED_LINES input to fail on coverage gaps#44
ggilder merged 3 commits into
ggilder:mainfrom
martin4861:fail-on-uncovered-lines

Conversation

@martin4861

@martin4861 martin4861 commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Adds an opt-in FAIL_ON_UNCOVERED_LINES input. When enabled and at least one annotation is produced, the Annotate check run finishes with conclusion: 'failure' and the step fails via core.setFailed(). This lets a repo block PRs that introduce coverage gaps.

Default is false, so existing consumers are unaffected.

  • annotate() now takes an optional conclusion (defaults to success); the inline conclusion union is extracted into an exported CheckConclusion type.
  • Inline annotation_level changes to failure
  • Any uncovered line added by the PR fails.

Testing

npm run all passes. Added tests for annotate() covering the default success conclusion, a forwarded failure conclusion, conclusion only being set on the final chunk for >50 annotations, and the no-annotations early return.

Not enabled in this repo's own test.yml, since it annotates its own PRs.

martin4861 and others added 3 commits July 31, 2026 15:04
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@martin4861 martin4861 changed the title Add FAIL_ON_UNCOVERED_LINES input to fail on coverage gaps Add FAIL_ON_UNCOVERED_LINES input to fail on coverage gaps Jul 31, 2026
@martin4861
martin4861 marked this pull request as ready for review July 31, 2026 13:40

@ggilder ggilder left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great! Thank you for the contribution.

@ggilder
ggilder merged commit 3ae5dbe into ggilder:main Aug 1, 2026
3 checks passed
@ggilder

ggilder commented Aug 1, 2026

Copy link
Copy Markdown
Owner

Published as v1.4.0 / updated v1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants